package io.nutz.nutzsite.module.acm.models;

import io.nutz.nutzsite.common.base.BaseModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import org.nutz.dao.entity.annotation.*;
import java.io.Serializable;
											
/**
 * acm竞赛采用的题目表 acm_contest_problem
 * 
 * @author lrw
 * @date 2020-02-16
 */
@Table("contest_problem")
public class ContestProblem implements Serializable {
	private static final long serialVersionUID = 1L;
	
			@Id
		@Column("id")
	@Comment("编号")
	private Integer id;

			/** 题目编号 */
	@Column("problem_id")
	@Comment("题目编号")
	private Integer problemId;

			/** 赛事编号 */
	@Column("contest_id")
	@Comment("赛事编号")
	private Integer contestId;

			/** 题目名称 */
	@Column("title")
	@Comment("题目名称")
	private String title;

			/** 题目序号ABC */
	@Column("num")
	@Comment("题目序号ABC")
	private String num;

			/** 提交次数 */
	@Column("submit")
	@Comment("提交次数")
	@Default("0")
	private Integer submit;

			/** AC次数 */
	@Column("accepted")
	@Comment("AC次数")
	@Default("0")
	private Integer accepted;

			/** 解决次数 */
	@Column("solved")
	@Comment("解决次数")
	@Default("0")
	private Integer solved;

			/** 选手 */
	@Column("submit_user")
	@Comment("选手")
	@Default("0")
	private Integer submitUser;

			/** 是否锁定 */
	@Column("defunct")
	@Comment("是否锁定")
	@Default("0")
	private boolean defunct;

			/** 绩点 */
	@Column("point")
	@Comment("绩点")
	@Default("100")
	private Integer point;

	
	public void setId(Integer id) 
	{
		this.id = id;
	}

	public Integer getId() 
	{
		return id;
	}

	public void setProblemId(Integer problemId) 
	{
		this.problemId = problemId;
	}

	public Integer getProblemId() 
	{
		return problemId;
	}

	public void setContestId(Integer contestId) 
	{
		this.contestId = contestId;
	}

	public Integer getContestId() 
	{
		return contestId;
	}

	public void setTitle(String title) 
	{
		this.title = title;
	}

	public String getTitle() 
	{
		return title;
	}

	public void setNum(String num) 
	{
		this.num = num;
	}

	public String getNum() 
	{
		return num;
	}

	public void setSubmit(Integer submit) 
	{
		this.submit = submit;
	}

	public Integer getSubmit() 
	{
		return submit;
	}

	public void setAccepted(Integer accepted) 
	{
		this.accepted = accepted;
	}

	public Integer getAccepted() 
	{
		return accepted;
	}

	public void setSolved(Integer solved) 
	{
		this.solved = solved;
	}

	public Integer getSolved() 
	{
		return solved;
	}

	public void setSubmitUser(Integer submitUser) 
	{
		this.submitUser = submitUser;
	}

	public Integer getSubmitUser() 
	{
		return submitUser;
	}

	public boolean isDefunct() {
		return defunct;
	}

	public void setDefunct(boolean defunct) {
		this.defunct = defunct;
	}

	public void setPoint(Integer point) 
	{
		this.point = point;
	}

	public Integer getPoint() 
	{
		return point;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("problemId", getProblemId())
            .append("contestId", getContestId())
            .append("title", getTitle())
            .append("num", getNum())
            .append("submit", getSubmit())
            .append("accepted", getAccepted())
            .append("solved", getSolved())
            .append("submitUser", getSubmitUser())
            .append("defunct", isDefunct())
            .append("point", getPoint())
            .toString();
    }
}
